<?php

namespace App\Models\Posts;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class WxPostsTag extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'wx_posts_tags';

    protected $fillable = ['posts_id','tags_id'];


    public function addAll(Array $data)
    {
//        $data['created_at'] = date('Y-m-d H:i:s',time());
//        $data['updated_at'] = date('Y-m-d H:i:s',time());

        $rs = DB::table($this->getTable())->insert($data);
        return $rs;
    }

}
